#ifndef DISTANCEMAP
#define DISTANCEMAP

#include "cached_distance_map.h"

#define MAP_INDEX(Map, I, J) ((I) + (J) * Map->SizeX)

	void MapUpdateCspace(DisMap *M, float MaxDist);
	bool operator<(const CellData& A, const CellData& B);
	CachedDistanceMap* GetDistanceMap(float Scale, float MaxDist);
	void Enqueue(DisMap* M, unsigned int I, unsigned int J, 
	     unsigned int SrcI, unsigned int SrcJ,
	     std::priority_queue<CellData>& Q,
	     CachedDistanceMap* Cdm,
	     unsigned char* Marked);

#endif
